import { ServiceProto } from 'tsrpc-proto';
import { ReqProductRoom, ResProductRoom } from './room/admin/PtlProductRoom';

export interface ServiceType {
    api: {
        "admin/ProductRoom": {
            req: ReqProductRoom,
            res: ResProductRoom
        }
    },
    msg: {

    }
}

export const serviceProto: ServiceProto<ServiceType> = {
    "version": 4,
    "services": [
        {
            "id": 2,
            "name": "admin/ProductRoom",
            "type": "api",
            "conf": {
                "needCheckAddress": true
            }
        }
    ],
    "types": {
        "admin/PtlProductRoom/ReqProductRoom": {
            "type": "Interface",
            "extends": [
                {
                    "id": 0,
                    "type": {
                        "type": "Reference",
                        "target": "../base/BaseRequest"
                    }
                }
            ],
            "properties": [
                {
                    "id": 0,
                    "name": "roomName",
                    "type": {
                        "type": "String"
                    }
                }
            ]
        },
        "../base/BaseRequest": {
            "type": "Interface",
            "properties": [
                {
                    "id": 0,
                    "name": "__ssoToken",
                    "type": {
                        "type": "String"
                    },
                    "optional": true
                }
            ]
        },
        "admin/PtlProductRoom/ResProductRoom": {
            "type": "Interface",
            "extends": [
                {
                    "id": 0,
                    "type": {
                        "type": "Reference",
                        "target": "../base/BaseResponse"
                    }
                }
            ],
            "properties": [
                {
                    "id": 0,
                    "name": "roomInfo",
                    "type": {
                        "type": "Reference",
                        "target": "../../type/RoomInfo/RoomInfo"
                    }
                }
            ]
        },
        "../base/BaseResponse": {
            "type": "Interface",
            "properties": [
                {
                    "id": 0,
                    "name": "__ssoToken",
                    "type": {
                        "type": "String"
                    },
                    "optional": true
                }
            ]
        },
        "../../type/RoomInfo/RoomInfo": {
            "type": "Interface",
            "properties": [
                {
                    "id": 0,
                    "name": "roomId",
                    "type": {
                        "type": "Number"
                    }
                },
                {
                    "id": 4,
                    "name": "roomName",
                    "type": {
                        "type": "String"
                    }
                },
                {
                    "id": 1,
                    "name": "currentNum",
                    "type": {
                        "type": "Number"
                    }
                },
                {
                    "id": 2,
                    "name": "maxNum",
                    "type": {
                        "type": "Number"
                    }
                },
                {
                    "id": 3,
                    "name": "roomState",
                    "type": {
                        "type": "Reference",
                        "target": "../../type/RoomInfo/RoomState"
                    }
                },
                {
                    "id": 5,
                    "name": "roomServerAddr",
                    "type": {
                        "type": "String"
                    }
                }
            ]
        },
        "../../type/RoomInfo/RoomState": {
            "type": "Enum",
            "members": [
                {
                    "id": 0,
                    "value": 0
                },
                {
                    "id": 1,
                    "value": 1
                },
                {
                    "id": 2,
                    "value": 2
                }
            ]
        }
    }
};